package mongodb

import (
	"gopkg.in/mgo.v2/bson"
)

type Camera struct {
	Id         string `bson:"Id"`
	DeviceId   string `bson:"DeviceId"`
	DeviceName string `bson:"DeviceName"`
	IpAddress  string `bson:"IpAddress"`
	MallName   string `bson:"MallName"`
}

func (connect *Connect) FindAllCamera() (*[]Camera, error) {
	c := connect.DataBase.C("D_Camera")
	var result []Camera
	err := c.Find(bson.M{}).All(&result)
	return &result, err
}
